<template>
  <div class="time" v-if="receiveIf">
    <div class="redenv-diy">
      <div class="big-circle"></div>
      <div class="mini-circle"></div>
    </div>
    <div>{{ gotInfo }}</div>
  </div>
</template>
<script>
export default {
  data() {
    return {};
  },
  props: {
    msgData: {
      type: Object,
    },
  },
  computed: {
    receiveIf() {
      if (this.msgData.redenvOwnerID==undefined) return false;
      return true;
    },
    gotInfo() {
      let man1 =
        this.msgData.userID == 0
          ? "你"
          : this.$store.state.userList[this.msgData.userID].name;
      let man2 =
        this.msgData.redenvOwnerID == 0
          ? "你"
          : this.$store.state.userList[this.msgData.redenvOwnerID].name;

      return `${man1}领取了${man2}的红包`;
    },
  },
};
</script>
<style lang="scss" scoped>
.time {
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 10px;
  color: rgb(160, 160, 160);
  height: 30px;
    margin-top: 8px;
}
.redenv-diy {
  width: 15px;
  height: 17.5px;
  margin-right: 6px;
  border-radius: 2px;
  background-color: rgb(215, 73, 61);
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  .big-circle {
    width: 30px;
    height: 30px;
    border-radius: 15px;
    background-color: rgb(227, 85, 73);
    position: absolute;
    top: -21px;
  }
  .mini-circle {
    width: 4px;
    height: 4px;
    border-radius: 2px;
    background-color: rgb(238, 203, 145);
    position: absolute;
    top: 7px;
  }
}
</style>